package cc.yiueil.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

// 第三方API的value随意指定, url配置为目标服务器地址
@FeignClient(value = "weather", url = "https://devapi.qweather.com")
public interface WeatherClient {

    @GetMapping(value = "/v7/weather/now")
    String getCurrentWeather(@RequestParam(value = "key") String key, @RequestParam(value = "location") String location);
}
